package Java道题;

import java.util.Scanner;

public class Test_3 {
	static public void out(String in) {
		float acount=0;
		float count=1;
		double cout=1;
		for(int i=0;i<in.length()-1;i++)
		{
			if(in.charAt(i)==in.charAt(i+1)) {
				++count;

			}
			else {
				acount+=count;
				count=1;
				cout++;
			}
			if(i==in.length()-2) {
				acount+=count;
				break;
			}
		}
		System.out.println(String.format("%.2f",acount/cout) );
	}



	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		String n=sc.next();
		out(n);
	}

}
